import java.util.Scanner;
public class Work10 {
    public static void main(String[] args) {
        System.out.println("请输入数组长度");
        Scanner scanner = new Scanner(System.in);
        int length = scanner.nextInt();
        int[] a = new int[length];
        System.out.println("请输入数组元素");
        for (int i = 0; i < length; i++) {
            a[i] = scanner.nextInt();
        }
        if (p(a)) {
            System.out.println("数组中存在重复数据");
        } else {
            System.out.println("数组中不存在重复数据");
        }
    }
    public static boolean p(int [] c){
        for (int i=0;i<c.length;i++){
            for (int j=i+1;j<c.length;j++){
                if (c[i]==c[j]){
                    return true;
                }
            }
        }
        return false;
    }
}
